Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <style> table, td { border: 1px solid black; } </style> </head> <body> <table id="myTable"> <tr> <td>Row 1</td> <td><input type="button" value="Delete" onclick="deleteRow(this)"></td> </tr> <tr> <td>Row 2</td> <td><input type="button" value="Delete" onclick="deleteRow(this)"></td> </tr> <tr> <td>Row 3</td> <td><input type="button" value="Delete" onclick="deleteRow(this)"></td> </tr> </table> <script> function deleteRow(r) { var i = r.parentNode.parentNode.rowIndex; document.getElementById("myTable").deleteRow(i); } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_table_deleterow2 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:35:05 GMT --> </html>
Result:
Try it Yourself - © w3schools.com